package com.itheima.search.feign;

import com.itheima.common.pojo.Result;
import com.itheima.search.document.ArticleInfoDocument;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Author：shenkunlin
 * @date： 2021/9/2 14:46
 * @Description：
 ***/
@FeignClient(value = "leadnews-search")
public interface SearchFeign{

    /**
     * 增加单个文章到ES索引库中
     */
    @PostMapping(value = "/saveToEs")
    Result saveToEs(@RequestBody ArticleInfoDocument document);
}
